/*
 * Created on Feb 10, 2005
 * Created by dfhuynh
 */
package edu.mit.simile.longwell.query;

import java.util.List;
import java.util.Set;
import java.util.SortedSet;

/**
 * @author dfhuynh
 */
public interface ISorter {
	/**
	 * Answer a list resulted by sorting the given objects in the given
	 * list of Order's.
	 * 
	 * @param objects
	 * @param orders
	 * @param locale
	 * @param fresh
	 * @return
	 */
	public List sort(Set objects, List orders, String locale, boolean fresh) throws QueryException;
	
	/**
	 * Answer a list of Ranking's for resorting the given set of objects. The
	 * higher on the list, the better the suggestion (the more complete order
	 * we'll get). The set of restrictors indicate how the set of objects were
	 * gotten.
	 * 
	 * @param objects
	 * @param restrictors
	 * @param locale
	 * @param fresh
	 * @return
	 */
	public List suggestOrders(
		Set objects, 
		SortedSet restrictors, 
		String locale, 
		boolean fresh) throws QueryException;
}
